Skip to content

[PWGJE] Add a new producer in PWGJE - #17400

Draft
mulewicz wants to merge 3 commits into
AliceO2Group:masterfrom
mulewicz:master
Draft

[PWGJE] Add a new producer in PWGJE#17400
mulewicz wants to merge 3 commits into
AliceO2Group:masterfrom
mulewicz:master

Conversation

@mulewicz

Copy link
Copy Markdown

The new producer will provide data to develop a machine learning jet tagger by fine-tuning the OmniLearn foundation model.

This commit introduces the QuarkGluonJetsProducer, which produces a self-contained quark/gluon jet ML skim from jet event data. It includes configurable parameters for event selections, jet properties, and particle identification methods.
@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 1 errors, ⚠️ 0 warnings, 🔕 0 disabled

@github-actions github-actions Bot changed the title Add a new producer in PWGJE [PWGJE] Add a new producer in PWGJE Aug 10, 2026
}

DECLARE_SOA_TABLE(QGMLJets, "AOD", "QGMLJETS",
qgmljet::EventId,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you save event and jet Id? when the merger tool runs it will make these tables obsolete unless you use specific index coloumns. However in that case they should be pointing to other tables

namespace qgmlconst
{
DECLARE_SOA_COLUMN(EventId, eventId, uint64_t);
DECLARE_SOA_COLUMN(JetId, jetId, uint64_t);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be an index coloumn pointing to the QGMLJets table

return result;
}

int getJetMcCollisionId(ChargedMCDJets::iterator const& jet)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its better to instead do the following:

jet.collision_as().mcCollisionId()

instead of looping through tracks. Also in case of reassociation of track to events you might get a different collision Id

static_cast<float>(dR),
jet.pt() > 0.f ? static_cast<float>(track.pt() / jet.pt()) : 0.f,
track.sign(),
static_cast<uint8_t>(passes),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you convert the bool to an int8 here? Also why even save the tracks that dont pass the track selection?

track.hasTOF() ? static_cast<float>(track.tofNSigmaKa()) : missingTOF,
track.hasTOF() ? static_cast<float>(track.tofNSigmaPr()) : missingTOF,
track.hasTOF() ? static_cast<float>(track.beta()) : missingTOF,
static_cast<uint8_t>(pid.isPion),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you save both this and the tof Nsigma above?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The foundation model I started working with uses these PID-derived features as inputs, so I initially wanted to preserve them in the producer. At the same time, I also wanted to keep the lower-level PID observables so I could later study which feature representation works best. However, I agree that the derived flags can be removed from the producer and recreated later in the data loader/preprocessing.

}
}

qgMLJets(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

write this table out before the track table so you can use its lastIndex() in the track table

@nzardosh

Copy link
Copy Markdown
Collaborator

Thanks for the PR @mulewicz . I have left some comments for you. Also does this build locally for you? I am surprised since the file is not appended with .cxx

@vkucera vkucera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mulewicz You are adding a new file. Please follow the contribution guidelines carefully and open your PR for review only after local testing.

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<QuarkGluonJetsProducer>(cfgc, TaskName{"quark-gluon-jets-producer"})};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use TaskName.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.cxx is missing.

COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(quark-gluon-jets-producer
SOURCES quarkGluonJetsProducer.cxx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot compile.

@vkucera
vkucera marked this pull request as draft August 12, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants